package com.ssy.lingxi.member.merchant.api.model.vo.paas;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 国家区域接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2020-08-21
 */
public class CountryAreaVO implements Serializable {
    private static final long serialVersionUID = -6039303795645571855L;

    /**
     * 区域编码
     */
    @NotBlank(message = "区域编码不能为空")
    @Size(max = 20, message = "区域编码最长20个字符")
    private String code;

    /**
     * 省市名称
     */
    @NotBlank(message = "区域名称不能为空")
    @Size(max = 100, message = "区域名称最长100个字符")
    private String name;

    /**
     * 层级
     */
    @NotNull(message = "层级不能为空")
    @Positive(message = "层级要大于0")
    private Integer level;

    /**
     * 上级编码
     */
    @NotBlank(message = "上级区域编码不能为空")
    @Size(max = 20, message = "上级区域编码最长20个字符")
    private String pCode;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getpCode() {
        return pCode;
    }

    public void setpCode(String pCode) {
        this.pCode = pCode;
    }
}
